package com.car.dal.dao.teastu;

import java.util.List;

import com.car.bean.GridObj;
import com.car.bean.OrderObj;
import com.car.bean.PageObj;
import com.car.dal.dao.ibatis.IbatisCommonDao;
import com.car.dal.object.TeacherStu;
import com.car.util.Page;

public class TeacherStuDaoImpl extends IbatisCommonDao<TeacherStu, Long> implements TeacherStuDao {

	public GridObj GetList(TeacherStu teaStu, PageObj pageObj) {
		OrderObj order = new OrderObj();
		order.setDir("desc");
		order.setSort("create_time");
		return super.findByPage(teaStu, pageObj, order);
	}
	
	public Integer getStudentCouBytea(TeacherStu teaStu) {
		return this.queryForInteger("getStudentCouBytea", teaStu);
	}
	
	public List<TeacherStu> getStudentListBytea(TeacherStu teaStu,Page page) {
		teaStu.setFirstrownum(page.getFirstrownum());
		teaStu.setPagesize(page.getPagesize());
		List<TeacherStu> list=this.queryForEntityList(TeacherStu.class,"getStudentListBytea", teaStu);
		return list;
	}
	
	public List<TeacherStu> getStudentListBytea2(TeacherStu teaStu) {
		List<TeacherStu> list=this.queryForEntityList(TeacherStu.class,"getStudentListBytea2", teaStu);
		return list;
	}
	
	
}
